package com.liuxinlong.jobs;

import com.liuxinlong.utils.TaskUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.liuxinlong.modules.entity.QuartzTask;

public class QuartzJobFactory implements Job {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        QuartzTask scheduleJob = (QuartzTask) context.getMergedJobDataMap().get("quartzTask");
        TaskUtils.invokMethod(scheduleJob);
    }
}
